import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/supplier/finance/settlement/` + url, ...arg)

/**
 * 结算单表Api接口管理器
 *
 * @author Mr.wu
 * @date  2025/04/09 17:28
 **/
export default {
	// 获取结算单表分页
	supplierSettlementPage(data) {
		return request('page', data, 'get')
	},
	// 提交结算单表表单 edit为true时为编辑，默认为新增
	supplierSettlementSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除结算单表
	supplierSettlementDelete(data) {
		return request('delete', data)
	},
	// 获取结算单表详情
	supplierSettlementDetail(data) {
		return request('detail', data, 'get')
	},
	// 批量导出
	supplierSettlementExport(data){
		return request('export',data, 'get',{
			responseType: 'blob'
		})
	}

}
